hk=outmn2d_prefit; h2=hhnor;hk->Divide(h2); hk->SetMaximum(2); hk->Draw("colz"); gPad->SetLogx()
hk=outmn2d_fit; h2=hhnor;hk->Divide(h2); hk->SetMaximum(2); hk->Draw("colz"); gPad->SetLogx()

tt=tree;tt->SetScanField(0); tt->Scan("totn:p00:e00:p10:e10:p20:e20:p30:e30:p00+p10+p20+p30:p02:e02:p12:e12:p22:e22:p32:e32:pix:xx:kfail:chidof"); > scan_fith.log
tt=bins;tt->SetScanField(0); tt->Scan("totn:p00:e00:p10:e10:p20:e20:p30:e30:p00+p10+p20+p30:p02:e02:p12:e12:p22:e22:p32:e32:pix:xx:kfail:chidof"); > scan_mn2d.log

tt=tree;tt->SetScanField(0); tt->Scan("totn:rawp00:rawe00:rawp10:rawe10:rawp02:rawe02:rawp12:rawe12:p00:e00:p10:e10:p00+p10:p02:e02:p12:e12:ix:xx:kfail:chidof"); > scan_fith.log
tt=bins;tt->SetScanField(0); tt->Scan("totn:rawp00:rawe00:rawp10:rawe10:rawp02:rawe02:rawp12:rawe12:p00:e00:p10:e10:p00+p10:p02:e02:p12:e12:ix:xx:kfail:chidof"); > scan_mn2d.log




c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p00", "","","e00",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("mn2d_p00.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p10", "","","e10",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("mn2d_p10.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p20", "","","e20",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("mn2d_p20.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p30", "","","e30",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("mn2d_p30.png")

c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p02", "","","e02",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("mn2d_p02.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p12", "","","e12",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("mn2d_p12.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p22", "","","e22",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("mn2d_p22.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("bins","1","xx","p32", "","","e32",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("mn2d_p32.png")

c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p00", "","","e00",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("fith_p00.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p10", "","","e10",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("fith_p10.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p20", "","","e20",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("fith_p20.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p30", "","","e30",0); gr->SetMarkerStyle(24); gr->SetMinimum(0.9); gr->SetMaximum(5e6);gr->Draw("ap"); gPad->SetLogx();gPad->SetLogy(); c1->Print("fith_p30.png")

c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p02", "","","e02",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("fith_p02.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p12", "","","e12",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("fith_p12.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p22", "","","e22",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("fith_p22.png")
c1=new TCanvas; gr=XGLUtils::TreeToGraph("tree","1","xx","p32", "","","e32",0); gr->SetMarkerStyle(24); gr->SetMinimum(0); gr->SetMaximum(0.15);gr->Draw("ap"); gPad->SetLogx(); c1->Print("fith_p32.png")

                                                                                                                                                                                 
//==================
gStyle->SetOptStat(0);
hh=hhnor;       
c1=new TCanvas; hh->SetMinimum(1e-6); hh->SetMaximum(1e-1); hh->Draw("colz"); gPad->SetLogx(); gPad->SetLogz(); hh->SetTitle("LHC10h"); hh->SetXTitle("p (GeV/c)"); hh->SetYTitle("TPC signal (a.u.)");c1->Print("data.png");
hh=outmn2d_fit; 
c1=new TCanvas; hh->SetMinimum(1e-6); hh->SetMaximum(1e-1); hh->Draw("colz"); gPad->SetLogx(); gPad->SetLogz(); hh->SetTitle("Fit"); hh->SetXTitle("p (GeV/c)"); hh->SetYTitle("TPC signal (a.u.)");
c1->Print("fit.png");
c1=new TCanvas; hk=(TH2D*)outmn2d_fit->Clone("hk"); h2=(TH2D*)hhnor->Clone("h2");hk->Divide(h2); hk->SetMinimum(0); hk->SetMaximum(2); hk->SetYTitle("Fit/Data"); hk->SetTitle(""); hk->Draw("colz"); gPad->SetLogx(); c1->Print("ratio_mn2d.png")
c1=new TCanvas; hk=(TH2D*)outmn2d_fit->Clone("hk"); h2=(TH2D*)hhnor->Clone("h2");hk->Divide(h2); hk->SetMinimum(0.8); hk->SetMaximum(1.2); hk->SetYTitle("Fit/Data"); hk->SetTitle(""); hk->Draw("colz"); gPad->SetLogx(); c1->Print("zoomratio_mn2d.png")


